//
//  File.swift
//
//
//  Created by didi on 2022/9/14.
//

import Molecular
import MolecularIcons
import MolecularRedirectObjects
import SwiftHtml
import Vapor

struct RedirectAdminWidgetTemplate: TemplateRepresentable {
    @TagBuilder
    func render(_ req: Request) -> Tag {
        Svg.arrowRightCircle
        H2("Redirect")
        Ul {
            if req.checkPermission(Redirect.Rule.permission(for: .list)) {
                Li {
                    A("Rules")
                        .href("/admin/redirect/rules/")
                }
            }
        }
    }
}
